package de.fhkiel.webservice;
 
import java.util.List;

import javax.jws.WebService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import de.fhkiel.webservice.dao.ItemDAO;
import de.fhkiel.webservice.data.Item;

@WebService(endpointInterface = "de.fhkiel.webservice.ItemService")
public class ItemServiceImpl implements ItemService {

    @Autowired
    private ItemDAO itemDAO;

    @Transactional
    public void addItem(Item item) {
    	itemDAO.addItem(item);
    }

    @Transactional
    public List<Item> listItem() {
        return itemDAO.listItem();
    }

    @Transactional
    public void removeItem(Integer id) {
    	itemDAO.removeItem(id);
    }

}